import useRequest from '@/utils/request'

const request = useRequest({})

export function getPage(params: any) {
  return request.get('/cj-user/sys/user/page', {
    params,
  })
}

// 获取小程序所有用户
export function getAppUserList() {
  return request.get('/cj-user/sys/user/getAppUserList')
}

// 小程序发送验证码
export function sendLoginNoByPhone(data: { [key: string]: any }) {
  return request.post('/cj-user/app/login/sendLoginNoByPhone', data)
}

// 小程序通过手机验证码登录
export function loginByPhoneCode(data: { [key: string]: any }) {
  return request.post('/cj-user/app/login/loginByPhoneCode', data)
}
